package org.emergency.framework.service.common;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.emergency.framework.model.TbPermission;
import org.emergency.framework.model.TbRole;

/**
 * map<角色id，collection<TbPermission>>静态map的调用接口
 * @author 
 * 使用,所在类加
 * 
 *" @Resource(name = "rolePermissionMappingImpl")
	private IRolePermissionMapping rolePermissionMapping;
 *"
 */

public interface IRolePermissionMapping {
	
	/**
	 * 装载map
	 * @return
	 */
	public Map<String, Collection<TbPermission>> loadRolePermission(); 

	/**
	 * 通过roleId拿tbPermission
	 * @param roleId
	 * @return
	 */
	public List<TbPermission> queryTbPermissionByRole(String roleId);
	
	/**
	 * 当变动后要去update这个map
	 */
	public void updateMap();
}
